package com.crm.service.impl;

import com.crm.dao.SaleChanceDao;
import com.crm.entity.SaleChance;
import com.crm.service.SaleChanceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 销售机会Service实现类
 *
 * @author Administrator
 */
@Service("saleChanceService")
public class SaleChanceServiceImpl implements SaleChanceService {

    @Resource
    private SaleChanceDao saleChanceDao;


    @Override
    public List<SaleChance> find(Map<String, Object> map) {
        return saleChanceDao.find(map);
    }

    @Override
    public Long getTotal(Map<String, Object> map) {
        return saleChanceDao.getTotal(map);
    }

    @Override
    public Integer add(SaleChance saleChance) {
        return saleChanceDao.add(saleChance);
    }

    @Override
    public Integer update(SaleChance saleChance) {
        return saleChanceDao.update(saleChance);
    }

    @Override
    public Integer delete(Integer id) {
        return saleChanceDao.delete(id);
    }

    @Override
    public SaleChance findById(Integer id) {
        return saleChanceDao.findById(id);
    }
}